package org.example.translation;

import org.dom4j.Document;
import org.dom4j.Element;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 将dom4j的document转换为此数据类
 */
public class StringsXMLData {
    //此文件的国家
    private String country;
    //此文件的原数据
    private Document sourceDocument;
    //string部分数据
    private Map<String, Element> sourceKV = new HashMap<>();
    //stringArray数据，list为其中的item标签条目
    private Map<String, List<?>> sourceArrayKV = new HashMap<>();
    //stringArray数据
    private Map<String, Element> sourceArray = new HashMap<>();



    public Map<String, Element> getSourceKV() {
        return sourceKV;
    }

    public StringsXMLData setSourceKV(Map<String, Element> sourceKV) {
        this.sourceKV = sourceKV;
        return this;
    }

    public Map<String, List<?>> getSourceArrayKV() {
        return sourceArrayKV;
    }

    public StringsXMLData setSourceArrayKV(Map<String, List<?>> sourceArrayKV) {
        this.sourceArrayKV = sourceArrayKV;
        return this;
    }

    public Document getSourceDocument() {
        return sourceDocument;
    }

    public StringsXMLData setSourceDocument(Document sourceDocument) {
        this.sourceDocument = sourceDocument;
        return this;
    }

    public String getCountry() {
        return country;
    }

    public StringsXMLData setCountry(String country) {
        this.country = country;
        return this;
    }

    public Map<String, Element> getSourceArray() {
        return sourceArray;
    }

    public StringsXMLData setSourceArray(Map<String, Element> sourceArray) {
        this.sourceArray = sourceArray;
        return this;
    }
}
